home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d977.lha
/
UChess
/
UChessSrc.lha
/
autoinit.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-16
|
828b
|
58 lines
#ifdef _M68020
#define __DO_STI_CPUCHECK
#else
#ifdef _M68881
#define __DO_STI_CPUCHECK
#else
#ifdef _M68040
#define __DO_STI_CPUCHECK
#else
#ifdef _M68030
#define __DO_STI_CPUCHECK
#endif
#endif
#endif
#endif
#ifdef __DO_STI_CPUCHECK
#include <proto/exec.h>
#include <exec/execbase.h>
#include <stdlib.h>
void _STI_CheckCPU(void);
void _STI_CheckCPU()
{
register long cpuid;
register struct ExecBase **execbaseptr=(struct ExecBase **)4;
register struct ExecBase *execbase;
execbase = *execbaseptr;
cpuid = execbase->AttnFlags;
#ifdef _M68020
if (!(cpuid & AFF_68020))
exit(0);
#else
#ifdef _M68030
if (!(cpuid & AFF_68020))
exit(0);
#else
#ifdef _M68040
if (!(cpuid & AFF_68020))
exit(0);
#endif
#endif
#endif
#ifdef _M68881
if (!(cpuid & AFF_68881))
exit(0);
#endif
}
#undef __DO_STI_CPUCHECK
#endif